# 批量移动并重名文件
import os
import glob
import shutil

source = os.getcwd() + '/test'
target = os.getcwd() + '/test-new'

if not os.path.exists(target):
    os.mkdir(target)

count = 1
for file in glob.glob(source + "/*.txt"):
    filename = os.path.basename(file)
    shutil.move(file, target + f'\{count}-终稿-{filename}')
    count += 1
print('移动并重名文件个数 ', count)
